package com.kang.gaklibrary.model;

import com.kang.gaklibrary.util.MyUtil;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;
import java.util.Date;

public class GoodsRecord {
    private Integer id;
    private Integer goodId;
    private String goodName;
    private Integer goodPrice;
    private String goodBusiness;
    private Integer goodNumber;
    private String goodLocation;
    private Timestamp date;

    public GoodsRecord(){}

    public GoodsRecord(Integer goodId, String goodName, Integer goodPrice, String goodBusiness, Integer goodNumber, String goodLocation, Timestamp date) {
        this.goodId = goodId;
        this.goodName = goodName;
        this.goodPrice = goodPrice;
        this.goodBusiness = goodBusiness;
        this.goodNumber = goodNumber;
        this.goodLocation = goodLocation;
        this.date = date;
    }

    public Integer getId() {
        return id;
    }

    public Integer getGoodId() {
        return goodId;
    }

    public String getGoodName() {
        return goodName;
    }

    public Integer getGoodPrice() {
        return goodPrice;
    }

    public String getGoodBusiness() {
        return goodBusiness;
    }

    public Integer getGoodNumber() {
        return goodNumber;
    }

    public String getGoodLocation() {
        return goodLocation;
    }

    public Date getDate() {
        return date;
    }

    public String getFormatDate(){
        return MyUtil.getDateByFormat("yyyy-MM-dd HH:mm", getDate());
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setGoodId(Integer goodId) {
        this.goodId = goodId;
    }

    public void setGoodName(String goodName) {
        this.goodName = goodName;
    }

    public void setGoodPrice(Integer goodPrice) {
        this.goodPrice = goodPrice;
    }

    public void setGoodBusiness(String goodBusiness) {
        this.goodBusiness = goodBusiness;
    }

    public void setGoodNumber(Integer goodNumber) {
        this.goodNumber = goodNumber;
    }

    public void setGoodLocation(String goodLocation) {
        this.goodLocation = goodLocation;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }
}